package com.company.poker.protocol;

/**
 * Description of class.
 * Created 4/12/13 1:19 PM
 *
 * @author andrey.rodin@playtech.com
 */

public enum MessageType {
    PING(0),
    PONG(1),
    REQUEST_LOGIN(2),
    RESPONSE_LOGIN(3),
    ;
    private int code;

    MessageType(int i) {
        this.code = i;
    }

    public int getCode() {
        return code;
    }

    public static MessageType getByCode(int i) {
        return values()[i];
    }
}
